﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$page_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$view_charset}" />
<meta name="keywords" content="{$page_keywords}" />
<meta name="Description" content="{$page_description}" />

<!--{css(style.css)}-->

<!--{css(common.css)}-->
<!--{js(common.js)}-->
<!--{js(form.js)}-->
<!--{js(quickview.js)}-->

</head>

<body>
<div class="wrapper"> 
  
  <!--[if lte IE 6]> 
	 <!--{js(DD_belatedPNG.js)}-->
	<script>DD_belatedPNG.fix('.png');DD_belatedPNG.fix('img');
	</script>
<![endif]--> 
  
  <!--{inc (header.view.html)}-->
  
  <div class="main">
    <div class="right">
      <div class="crumbs"><a href="?companyid={$companyid}">{$lang.site_home}</a> &gt; {$lang.in_line}</div>
      <div class="page">
        <div class="maintitle">
          <p>{$lang.in_line}</p>
          <span>&nbsp;</span> </div>
        <div class="inquiry">
          <form action="<!--{if (!empty($url_id))}--><!--{url ('?app=leaveword&act=editaction)}--><!--{else}-->?app=leaveword&act=post&companyid={$companyid}<!--{/if}-->" name="theForm"  onsubmit="return doInquirySubmit()" method="post">
            <p>{$lang.please_fill_in_basic_information}</p>
            <ul>
              <li>
                <p><font color="#FF0000">*</font>{$lang.message_theme}:</p>
                <span style="float:left;"><span id="a"> <span class="msgbase">
                <input type="text"  name="data[title]" onblur="subjectCheck('subject')" value="{$data.title}" style="width:250px;" id="subject" />
                </span> <span class="msg" style="clear:both;"> <span class="" id="subjectMsg" style="display:none;"></span> </span> </span></span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.message_subject}:</p>
                <span><span id="b"> <span class="msgbase">
                <textarea name="data[content]" cols="60" rows="8" id="content" onblur="contentCheck('content')">{$data.content}</textarea>
                </span> <span class="msg" style="clear:both; width:400px;"> <span class="" id="contentMsg" style="display:none;"></span> </span> </span></span></li>
            </ul>
            <span class="clear"></span>

            <ul>
              <li>
                <p><font color="#FF0000">*</font>{$lang.called}:</p>
                <span> <span id="d"> <span class="msgbase">
                <input name="data[truename]" type="text" id="name" onblur="nameCheck('name')" value="{$data.name}" size="14" style="margin-left:10px;" />
                </span> <span class="msg"> <span class="" id="nameMsg" style="display:none;"></span> </span> </span> </span></li>
              <li>
                <p><font color="#FF0000">*</font>{$lang.phone}:</p>
                <span><span id="f"> <span class="msgbase">
                <input name="data[mobphone]" type="text" id="tel" value="{$data.telphone}" onblur="telCheck('tel')" size="30" />
                </span> <span class="msg"> <span class="" id="telMsg" style="display:none;"></span> </span> </span></span></li>
              <p></p>
              <span>
              <input type="submit" value="{$lang.submit}" name="Submit" >
              <input name="id" type="hidden" value="{$url_id}" />
              <input name="reset" value="{$lang.reset}" type="reset" />
              </span>
              </li>
            </ul>
          </form>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    <div class="left"> 
      
      
      <!--{inc (sort_w.view.html)}--> 
      
    </div>
    <div class="clear"></div>
    <div class="mainfoot"></div>
  </div>
  <script type="text/javascript">
<!--
var CheResult = true;
function subjectCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.message_theme}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function contentCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.content}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}


function nameCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.called}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}

function telCheck(id){
	CtoH(id);
	if( isEmpty(GE(id).value) == true ){
		SetMsg("error",id,"block","{$lang.please_fill} {$lang.phone}");
		return false;
	}else{
		SetMsg("success",id,"none","");
	}
}



function doInquirySubmit(){
	CheResult = true;
	firstErrorControl = "";
	
	if(subjectCheck("subject") == false)
		CheResult = false;

	if(contentCheck("content") == false)
		CheResult = false;



	if(nameCheck("name") == false)
		CheResult = false;

	if(telCheck("tel") == false)
		CheResult = false;


		
	SetMsgFocus();
	return CheResult;
}
//-->
</script>
  <div class="clear"></div>
  
  <!--{inc (footer.view.html)}-->
  
  <div class="clear"> </div>
</div>
</body>
</html>